home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
borland
/
jnfb88.zip
/
PALPRO.ZIP
/
HYPO.C
< prev
next >
Wrap
Text File
|
1987-10-07
|
389b
|
25 lines
#include <stdio.h>
#include <math.h>
float Hypotenuse(x,y)
int x,y;
{
float w,z;
w = x*x;
z = y*y;
return sqrt(w+z);
}
main()
{
int x,y;
x = 4;
y = 5;
printf("If a right triangle has sides %d and %d,\n",x,y);
printf("then its hypotenuse is %f.\n",Hypotenuse(x,y));
}